﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class MyRecipe : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["Userid"] == null)
        {
            Response.Redirect("index.aspx");
        }
        if (!IsPostBack)
        { 
            Session.Remove("RecipeOfMealPlan");
            Session.Remove("RecipeId");
        }
       
    }

    protected void imgMealPlan_Click(object sender, ImageClickEventArgs e)
    {
        if (isActive.Value.Equals("true"))
        {
            Session["RecipeOfMealPlan"] = GroceryRecipe.Value;
        }
        Response.Redirect("CreateMealPlan.aspx");

    }
    protected void imgGrocery_Click(object sender, ImageClickEventArgs e)
    {
        if (isActive.Value.Equals("false"))
        {
            Session["RecipeId"] = GroceryRecipe.Value;
        }
        Response.Redirect("Grocery.aspx");
    }
}